import request from "@/utils/request";

// 按照条件进行分页查询文档
export const documentinfopage = (data: object) => {
  return request.post("/document/info/page", data);
};

// 
export const resourceinfo = (id: number) => {
  return request.get("/resource/info/"+ id);
};

//按照主键删除文档
export const documentInfoRemove = (data:Array<Object>) => {
  return request.post("/document/info/remove", data);
};

//查询文档和资源的关系
export const documentResourceSelect = (id:string | string[]) => {
  return request.get("/document/resource/select/" + id);
};


//使用模板创建文档
export const documentInfoSave = (data:object) => {
  return request.post("/document/info/save" ,data);
};

//保存文档和资源的关系
export const documentResourceSave = (data: Array<Number>) => {
  return request.post("/document/resource/save",data);
};


//删除文档和资源的关系
export const documentResourceDelete = (data: Array<Number>) => {
  return request.post("/document/resource/delete",data);
};